#pragma once

#include <QAction>
#include <QErrorMessage>
#include "../toolplugin.h"
#include "../../contour/blurmap.h"

namespace PBVP {
	class DataManager;
	class MolVolumeControl;
	class RenderManager;
	///
	class MolVolumePlugin : public QObject, public ToolPlugin
	{
		Q_OBJECT
		Q_INTERFACES(PBVP::ToolPlugin)
	public:
		/// 
		MolVolumePlugin();
		/// Destructor
		virtual ~MolVolumePlugin();
		///
		virtual QString description() const {
			return QString("Construct volume from protein data");
		} 
		/// 
		virtual void initialize(MainInterface* mainInterface);
		///
		virtual bool isSupported(DataNode* pNode);

		///
		virtual QAction* getToolAction() {
			return molVolAction;
		}

	public slots:
		void shownControl();

	private:
		
		QAction *molVolAction;
		QErrorMessage *errorMessage;

		DataManager *m_pDataManager;
		RenderManager *m_pRenderManager;

		MolVolumeControl *m_pControl;
		BlurMap *m_pBlurMap;
	};
}